#!/bin/sh

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/usr/X11/lib/X11/xinit/.Xresources
sysmodmap=/usr/X11/lib/X11/xinit/.Xmodmap

# merge in defaults and keymaps

if [ -f $sysresources ]; then

    if [ -x /usr/bin/cpp ] ; then
        xrdb -merge $sysresources
    else
        xrdb -nocpp -merge $sysresources
    fi



fi

if [ -f $sysmodmap ]; then
    xmodmap $sysmodmap
fi

if [ -f "$userresources" ]; then

    if [ -x /usr/bin/cpp ] ; then
        xrdb -merge "$userresources"
    else
        xrdb -nocpp -merge "$userresources"
    fi



fi

if [ -f "$usermodmap" ]; then
    xmodmap "$usermodmap"
fi

# start some nice programs




if [ -d /usr/X11/lib/X11/xinit/xinitrc.d ] ; then
	for f in /usr/X11/lib/X11/xinit/xinitrc.d/*.sh ; do
		if [ "$f" = "/usr/X11/lib/X11/xinit/xinitrc.d/99-quartz-wm.sh" ] ; then
		  echo "Skipping quartz $f" >> /tmp/whyme
		  continue
		fi
		[ -x "$f" ] && . "$f"
	done
	unset f
fi


export PATH="/opt/local/bin:$PATH"
export LD_LIBRARY_PATH="/opt/local/lib:$LD_LIBRARY_PATH"
quartz-wm --onnly-proxy &
#Was at end
#xclock -geometry 50x50-1+1 &
#xterm -geometry 80x50+494+51 &
#xterm -geometry 80x20+494-0 &
#exec xterm -geometry 80x66+0+0 -name login
#End was at end.
exec /opt/local/bin/fvwm2
